﻿using SqlSugar;

namespace Nuclear.Models.DbModels;

public class ConsumeCode
{
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }

    [SugarColumn(Length = 20)]
    public string SystemId { get; set; }

    [SugarColumn(Length = 20)]
    public string MerchantId { get; set; }

    [SugarColumn(Length = 20)]
    public string ProductId { get; set; }

    [SugarColumn(Length = 20)]
    public string UserId { get; set; }

    [SugarColumn(IsNullable = false, Length = 20)]
    public string BenefitsCardNo { get; set; }

    [SugarColumn(IsNullable = false, Length = 20)]
    public string DistrictId { get; set; }

    [SugarColumn(IsNullable = false)]
    public DateOnly ValidFrom { get; set; }

    [SugarColumn(IsNullable = false)]
    public DateOnly ValidTo { get; set; }

    [SugarColumn(IsNullable = false, Length = 10)]
    public string Code { get; set; }

    [SugarColumn(IsNullable = false)]
    public bool IsUsed { get; set; }

    [SugarColumn(IsNullable = false)]
    public DateTime CreateTime { get; set; } = DateTime.UtcNow;

    [SugarColumn(IsNullable = true)]
    public DateTime? UpdateTime { get; set; }

    [SugarColumn(IsNullable = true)]
    public DateTime? UseTime { get; set; }
}